<template>
  <el-config-provider :locale="zhCn">
    <router-view v-slot="{ Component }">
      <transition name="rootpage">
        <component :is="Component" />
      </transition>
    </router-view>
  </el-config-provider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
</script>

<style>
.rootpage-enter-active,
.rootpage-leave-active {
  top: 0;
  position: absolute;
  transition: all 0.5s;
}

.rootpage-enter-from {
  position: absolute;
  top: 0;
  opacity: 0;
  transform: translateX(100%);
}

.rootpage-leave-to {
  position: absolute;
  top: 0;
  opacity: 0;
  z-index: -99;
  transform: translateX(-100%);
}
</style>
